<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/include.inc.jsp" %>
<!DOCTYPE html>

<html>
<head>
    <%@include file="/WEB-INF/views/layout/base.ref.jsp" %>
</head>
<body>
<%@include file="/WEB-INF/views/login/home/toolbar.jsp" %>
<div class="mtcontent">
    <div class="mtheader">
        <shiro:hasPermission name="inputInfo:add">
            <a class="mtbtn one" href="#"
               onclick="hrefNew_OnClick('${ctx}/input/inputinfo/edit?id=-1&useId=${useId}');"><span><i
                    class="mtfa mt-add"></i>添加</span></a>
        </shiro:hasPermission>
        <shiro:hasPermission name="inputInfo:del">
            <a class="mtbtn two" href="#"
               onclick="bootstrapDel_OnClick('${ctx}/input/inputinfo/del','${useId}')"
               title="确定要删除吗?"> <span><i class="mtfa mt-del"></i>删除</span>
            </a>
        </shiro:hasPermission>
    </div>
    <div class="mtbody">
        <div class="space-4"></div>
        <form method="post" id="pagerForm" action="${ctx}/input/inputinfo/list?useId=${useId}">
            <input type="hidden" name="ifSession" value="1"/> <input type="hidden" name="pageNum" value="1"/> <input
                type="hidden" name="pageSize" value="${vo.pageSize}"/> <input type="hidden" name="orderField"
                                                                              value="${param.orderField}"/> <input
                type="hidden" name="orderDirection" value="${param.orderDirection}"/>
            <div class="mtrow">
                <div class="mtcolall">
                    <label class="mtlabel-auto">指标名称：</label>
                    <input type="text" class="mtinput" name="arg" value="${vo.arg}"/>
                    <a class="mtbtn search marginleft" href="#" onclick="queryClick('pagerForm')"><i
                            class="mtfa mt-search"></i><span>查询</span></a>
                </div>
            </div>
        </form>

        <div class="space-4"></div>
        <table id="grid">
        </table>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    $(function () {

        var cols = [{
            title: '选择',
            field: 'check',
            checkbox: true,
            align: 'center',
            valign: 'middle'
        },
            {
                title: '操作', field: 'id', checkbox: false, align: 'center', valign: 'middle', width: 80,
                formatter: function (value, row, index) {
                    return '<a href="#" onclick="hrefNew_OnClick(\'${ctx}/input/inputinfo/edit?id=' + value + '\')"><i class="mtfa mt-pen mtblue mtpointer"></i></a>';
                }
            },
            {title: '指标名称', field: 'caption', align: 'center', valign: 'middle', sortable: true},
            {title: '用途', field: 'use2', align: 'center', valign: 'middle', sortable: true},
            {title: '类型', field: 'typeNameZh', align: 'center', valign: 'middle', sortable: true},
            {title: '最小值', field: 'minVal', align: 'center', valign: 'middle', sortable: true},
            {title: '最大值', field: 'maxVal', align: 'center', valign: 'middle', sortable: true},
            {title: '是否必填', field: 'isRequireZh', align: 'center', valign: 'middle', sortable: true}]

        var data = ${inputInfoList};
        meeting.grid("#grid", cols, data);
    });
</script>
